-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add job and instance as well-known labels in prometheus receiver #2897
Add job and instance as well-known labels in prometheus receiver #2897
Conversation
e6f1024
to
213e1be
Compare
Codecov Report
@@ Coverage Diff @@
## main #2897 +/- ##
=======================================
Coverage 91.74% 91.74%
=======================================
Files 286 286
Lines 15086 15088 +2
=======================================
+ Hits 13841 13843 +2
Misses 851 851
Partials 394 394
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@bjrara which of the linked issues are fully resolved by this PR? |
#2964 should address this issue. |
…orter (#2979) This is a follow up to #2897. Fixes #575 Fixes #2499 Fixes #2363 Fixes open-telemetry/prometheus-interoperability-spec#37 Fixes open-telemetry/prometheus-interoperability-spec#39 Fixes open-telemetry/prometheus-interoperability-spec#44 Passing compliance tests: $ go test --tags=compliance -run "TestRemoteWrite/otelcollector/Job.+" -v ./ === RUN TestRemoteWrite === RUN TestRemoteWrite/otelcollector === RUN TestRemoteWrite/otelcollector/JobLabel === PAUSE TestRemoteWrite/otelcollector/JobLabel === CONT TestRemoteWrite/otelcollector/JobLabel --- PASS: TestRemoteWrite (10.02s) --- PASS: TestRemoteWrite/otelcollector (0.00s) --- PASS: TestRemoteWrite/otelcollector/JobLabel (10.02s) PASS ok github.com/prometheus/compliance/remote_write 10.382s $ go test --tags=compliance -run "TestRemoteWrite/otelcollector/Instance.+" -v ./ === RUN TestRemoteWrite === RUN TestRemoteWrite/otelcollector === RUN TestRemoteWrite/otelcollector/InstanceLabel === PAUSE TestRemoteWrite/otelcollector/InstanceLabel === CONT TestRemoteWrite/otelcollector/InstanceLabel --- PASS: TestRemoteWrite (10.01s) --- PASS: TestRemoteWrite/otelcollector (0.00s) --- PASS: TestRemoteWrite/otelcollector/InstanceLabel (10.01s) PASS ok github.com/prometheus/compliance/remote_write 10.291s $ go test --tags=compliance -run "TestRemoteWrite/otelcollector/RepeatedLabels.+" -v ./ === RUN TestRemoteWrite === RUN TestRemoteWrite/otelcollector --- PASS: TestRemoteWrite (0.00s) --- PASS: TestRemoteWrite/otelcollector (0.00s) testing: warning: no tests to run PASS
After this PR was merged, I still don't see instance and job labels |
I'm using version 0.55.0 and I still don't see instance and job labels. |
…x-agent (open-telemetry#2897) * Bump github.com/hashicorp/vault in /pkg/signalfx-agent Bumps [github.com/hashicorp/vault](https://github.com/hashicorp/vault) from 1.12.2 to 1.12.5. - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](hashicorp/vault@v1.12.2...v1.12.5) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Antoine Toulme <atoulme@splunk.com>
In Prometheus,
job
andinstance
are the two auto generated labels, however they are both dropped by prometheus receiver. Although these information is still available inservice.name
andhost
:port
, it breaks the data contract for most Prometheus users (who usejob
andinstance
to consume metrics in their own system).This PR adds
job
andinstance
as well-known labels in prometheus receiver to fix the issue.Link to tracking Issue:
#575
#2499
#2363
open-telemetry/prometheus-interoperability-spec#7